package com.AppliGestion.client.RuleMakingSystem;

import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.AppliGestion.shared.model.RuleMakingSystem.data.DataElement;


public class DataRecord extends ListGridRecord{
	
	
	
	public DataRecord(){}
	
	public DataRecord(String label,DataElement dataElement) {
		setLabel(label);
		setParam(dataElement.isParameter());
		setType(dataElement.getTypeData().toString());
		setValue( dataElement.getValue());		
	}
	
	
	public DataRecord(String label,boolean isParam,String type,Object value) {
		setLabel(label);
		setParam(isParam);
		setType(type);
		setValue(value);	
	}

	/**
	 * @param label the label to set
	 */
	public void setLabel(String label) {
		setAttribute("label", label);
	}

	/**
	 * @return the label
	 */
	public String getLabel() {
		return getAttributeAsString("label");
	}

	/**
	 * @param isParam the isParam to set
	 */
	public void setParam(boolean isParam) {
		setAttribute("isParam", isParam);
	}

	/**
	 * @return the isParam
	 */
	public boolean isParam() {
		return getAttributeAsBoolean("isParam");
	}

	/**
	 * @param type the type to set
	 */
	public void setType(String type) {
		setAttribute("type", type);
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return getAttributeAsString("type");
	}

	/**
	 * @param value the value to set
	 */
	public void setValue(Object value) {
		setAttribute("value", value);
	}

	/**
	 * @return the value
	 */
	public Object getValue() {
		return getAttributeAsObject("value");
	}
	
	
	
	
	
}
